package jmine.tec.aom.dao;

import java.util.List;

import jmine.tec.aom.domain.AbstractPropertyValue;
import jmine.tec.aom.domain.Property;

import org.hibernate.criterion.Restrictions;

import bancosys.tec.persist.dao.BaseDAO;

/**
 * DAO for {@link AbstractPropertyValue}
 * 
 * @author jrenaut
 */
public class AbstractPropertyValueDAO extends BaseDAO<AbstractPropertyValue> {

    /**
     * @param property a {@link Property}
     * @return a list of {@link AbstractPropertyValue} for the given {@link Property}
     */
    public List<AbstractPropertyValue> findByProperty(Property property) {
        return this.executeQuery(this.createCriteria().add(Restrictions.eq("property", property)));
    }

}
